class Animal {
    protected void eat() {}
}

class Cat extends Animal {
    public String name;

    public Cat(String name) {
        super();
        this.name = name;
    }

    @Override
    protected void eat() {
        System.out.println(name + "吃猫粮");
    }
}

class Dog extends Animal {
    public String name;

    public Dog(String name) {
        super();
        this.name = name;
    }

    @Override
    protected void eat() {
        System.out.println(name + "吃粮狗");
    }
}

class FeedPerson {
    public static void feed(Animal a) {
        System.out.println("开始饲养");
        a.eat();
    }
}

public class EatDemo {
    public static void main(String[] args) {
        Cat cat = new Cat("小花");
        Dog dog = new Dog("小黄");
        FeedPerson.feed(cat);
        FeedPerson.feed(dog);
    }
}